home *** CD-ROM | disk | FTP | other *** search
- A Scientific Calculator
- =======================
-
- Version 1.07 (1-Jan-93)
-
-
- * If you do not read documentation then please note the *
- * following ‘key’ (sic) features of this calculator. *
- * *
- * Result dragging *
- * <ALT> rather than <SHIFT> now does simulated input *
- * Key short cuts ( + translation table) *
- * Fully algebraic *
- * Constant operations *
- * Adjust accesses the inverse function *
- * Auto detects BASIC 64 and uses the extra precision *
- * Now with desktop saving! *
- * Can rename the app with no problem cos uses chkspr *
-
- * This app is now well past its FOURTH birthday - *
- * would users please read the questions near the of *
- * this document and - perhaps - reply. *
-
-
- Files included in this package :-
-
- !Run
- !Run64
- !RunImage
- !Sprites
- !Help
- Templates
- Sprites
- messages
- KeyTable
- MakeTable
- chkspr ) my chkspr util, rename the app and see what
- !Boot ) happens (nothing!), description in Comments.
-
- When this scientific calculator application was first
- written there were no others. Now there are several,
- including the dreadful Acorn one. I hope you find that this
- is the best - if not I would appreciate a note!
-
- Introduction
- ------------
-
- The calculator is fully algebraic.
-
- [ This means expressions are evaluated using
- BODMAS order (Brackets, Power, Divide/Multiply,
- Add/Subtract - where brackets are evaluated
- first). Hence 2+3*4 is calculated as 2+(3*4)
- since * has a higher priority - non-algebraic
- calculators that would evaluate (2+3)*4 ]
-
-
- Also the calculator handles magnitudes greater than
- 99999999, using 9 digits with scientific notation (9 digits
- because the tenth digit in BBC BASIC V is generally wrong
- when doing function calculations)
-
- Should this calculator be loaded under BASIC VI the 64 bit
- floating point BASIC 64 then the extra precision will
- manifest itself.
-
- NOTE BASIC V’s largest number is of the order 1*10^32
- precision is about 9 digits
-
- BASIC VI’s largest number is of the order 1*10^308
- precision is about 14 digits
-
- To load !SciCalc under BASIC VI (64bit) you simply need to
- rename (or delete) the current !Run file and then rename
- !Run64 to !Run.
-
- On top of all this the calculator has a very large range
- of scientific functions. The range and layout have been
- inspired by years of Casio calculator use - I’m sorry but
- TIs are shite!
-
- Usage
- -----
-
- Functions are accessed by using the standard
- ‘Reverse-Polish’ method used on normal calculators
- (eg 20 sin rather than sin 20).
-
- All functions are listed in the Appendix below.
-
- To use a function on the currently displayed number
- click select on the function name
-
- *** The inverse function of a key is available ***
- *** by clicking ADJUST rather than SELECT ***
-
- (ie SELECT for sin, ADJUST for arcsin).
-
-
- Unobvious Adjust functions are:-
-
- EXP where SELECT sets the multiplying power of ten
- and ADJUST gives PI (EXP also gives PI if you
- have not entered any digits after a clear or
- equals).
-
- rnd where SELECT fixes the display (see menu options
- below) and ADJUST gives a random number.
-
-
- If an algebraic operation (*/+-^) is clicked on twice
- then the calculator enters ‘constant’ mode, a ‘K’ lights up
- in the top left hand corner of the window to signify this.
- Once in constant mode the selected algebraic operation is
- repeated with the current register on any entered numbers
- each time = is clicked (try it and see!). Constant mode is
- cancelled by AC or entering any other algerbric operation.
-
-
- Clicking on SciCalc’s iconbar sprite or on the
- calculator’s keys will cause the calculator to claim the
- caret and then numbers (including hex) can be entered via
- the keyboard or keypad. Note if numlock is off you will not
- be able to use the keypad(!).
-
- <Escape> will return the caret to its original position.
-
- NOTE # is AC, <delete> is C and <SH><del> is AC
-
-
- Memory
- ------
-
- Memory functions available are :-
-
- MR Memory recall
- Min Memory set to display
-
- To clear the memory SELECT clear and then SELECT Min
-
- If a number is stored in the memory then the memory
- indicator (small M in the top left corner) is ‘lit
- up‘.
-
-
- Menu Options
- ------------
-
- Option ‘Ascii’
-
- This option has a submenu which displays all the ASCII
- characters in a window. To place an ascii value of a
- character in the display icon simply click on that
- character (clicking with select removes the window,
- clicking with adjust does not!). The ASCII value of the
- character will be displayed in the current base in the
- display icon.
-
-
- Options ‘Deg’, ‘Hex’ and ‘Gra’
-
- To change the current angular measure choose the
- appropriate item. All angular functions will now operate in
- this measure and the correct angular measure indicator will
- ‘light up’.
- The angular measure may also be set by clicking on the
- appropriate indicator.
- Deg has 360 degrees in a circle
- Rad has 2pi radians in a circle
- Gra has 400 gradians in a circle
-
- Options ‘Dec’, ‘Hex’ and ‘Bin’
-
- To change the current display base choose the appropriate
- item. ‘Dec’ represents base 10 (the usual one!), ‘Hex’ base
- 16 and ‘Bin’ base two. The display icon will change to the
- appropriate base and the correct base indicator will ‘light
- up‘.
- The base may also be set by clicking on the appropriate
- indicator.
-
- NOTE: Two new functions become available in Hex or Bin mode
- << SELECT shifts the bits left, ADJUST right
- (over/under flow ignored)
- <O SELECT rotates the bits left, ADJUST rights
-
- In base 16 sin, cos, tan, 1/x, log and ln become A,
- B, C, D, E and F for hex entry. In bases 16 and 2 the
- following functions cease to work (function!) sin,
- cos, tan, hyp, root, 1/x, log, ln, rnd, rnd#, EXP.
- Unavailable options are greyed out.
-
-
- Options ‘Norm’,‘Fix’ and ‘Sci’
-
- To change the method of displaying base ten numbers
- choose the appropriate item from the appropriate submenu
- (ie for fix 3 choose ‘3’ from the ‘Fix’ submenu). ‘Fix’
- specifies the number of decimal places to be displayed
- (rounding if necessary) the number if required, ‘Sci’
- specifies the number of significant digits past the decimal
- point under scientific notation (again rounding if
- necessary). ‘Norm’ unsets the ‘Fix’ and ‘Sci’ choice and
- returns the display mode to the one chosen by the
- application as appropriate
-
- NOTE: The function ‘rnd’ will set the internal register to
- the value of the displayed register (ie if you are
- using Fix 3 to show 3.14159265 the the display is
- 3.142 and on clicking rnd the register storing
- 3.14159265 becomes 3.142 so if you choose ‘Norm’ the
- display is still 3.142). Norm unsets Fix and Sci
- settings.
-
-
- Result Dragging
- ---------------
-
- The value currently displayed (in the format displayed)
- can be transferred from !SciCalc to any other application
- (or the filer) as a textfile.
-
- To store the value simply drag the display icon onto the
- receiving application. The receiving application will treat
- this as it would when a textfile is dragged onto it. To
- facilitate this !SciCalc does not claim the caret when you
- click on the display icon (whereas it does if you click on
- any other).
-
- Sometimes it is either inconvenient or impossible to drag
- the display icon onto the receiving application (eg a
- writable icon). The result can be sent as if is was typed
- in by placing the pointer over the calculator and pressing
- <ALT>.
-
- The <SHIFT> facility is also particularly useful when using
- !Edit because !Edit does not move the caret to the end of a
- inserted file, the <SHIFT> facility does this by default.
- (Note Impression does not have this problem and drags can
- be done easily.)
-
-
- Appendix 1 - Functions
- ----------------------
-
- Key Select Adjust
- -----------------------------------------------------------
- ! sin ! Sine (x) ! Arcsine (x) !
- ! cos ! Cosine (x) ! Arccosine (x) !
- ! tan ! Tangent (x) ! Arctangent (x) !
- ! hyp ! Hyperbolic of trig fn ...! ArcHyperbolic trig fn!
- ! 1/x ! The reciprocal of x ! !
- ! log ! Log base 10 (x) ! 10 to the power x !
- ! ln ! Log base e (x) ! e to the power x !
- ! EXP ! pi or x*10^(entry) ! pi !
- ! ! ! x factorial ! !
- ! Min ! put x in the memory ! !
- ! MR _ ! display the memory ! !
- ! € ! the square root of x ! x² !
- ! x^y ! x raised to power entry ! x^(1/y) !
- ! not ! logical not x ! !
- ! and ! logical and x with entry ! !
- ! or ! logical or x with entry ! !
- ! eor ! logical eor x with entry ! !
- ! rnd ! Register set to display ! Random # from 0 to 1 !
- ! AC ! Clears all except memory ! !
- ! C ! Clears display only ! !
- ! +/- ! swaps the sign of x ! !
- ! ( ! Open bracket,20 levels ! !
- ! ) ! Close bracket ! !
- ! << ! Shift bits left ! Shift bits right !
- ! <O ! Rotate bits left ! Rotate bits right !
- -----------------------------------------------------------
-
-
- Appendix 2 - System Variable
- ----------------------------
-
- The system variable <Emm’sSciCalc$Options> is read a run
- time (and saved with a desktop save). It can contains
- several modifiers :-
-
- -base 10|16|2 (10 = dec, 16 = hex, 2 = bin)
- -mode 1|2|3 (1 = deg, 2 = rad, 3 = gra)
- -fix n (n = number of places )
- -sci n (n = number of places )
- -x n (n = bottom left x coord )
- -y n (n = bottom left y coord )
-
- So Set Emm’sSciCalc$Dir -base 16 -mode 2 -sci 3
-
- sets the base to hex, angular measure to radians and will
- uses scientific notation (3 places) when in decimal mode.
-
-
- Appendix 3 - Key short cuts
- ---------------------------
-
- The following keys are short cuts to their 'iconsakes' :-
-
- 0 1 2 3 4 5 6 7 8 9 - + / * = . ( ) (all with SELECT)
-
- The following keys are mapped to their 'iconsakes' but
- WILL work when in base 10.
-
- A B C D E F (all with SELECT)
-
- The following keys are mapped as such :-
-
- Key Icon
-
- <Delete> C (with SELECT)
- <Shift><Delete> AC (with SELECT)
- # C (with SELECT)
- < << (with SELECT)
- > << (with ADJUST)
-
- Appendix 4 - Versions
- ---------------------
-
- v1.03 Due to popular appeal (well I did ask for comments!)
- I have now made the mode buttons act to clicks (fix
- and sci don't). The divide key has been ‘spriteized’
- (cos someone who obviously doesn’t use Latin 1 asked
- me to).
-
- v1.04 Hex input can be in either case (thanks Damon)
- Fixed the caret claiming bug (for good?)
- Dragable results (idea from Keith Slone, thanks!)
-
- v1.05 ASCII table added
- When <SHIFT> is pressed the pointer need not be
- on the display icon.
- Calculator now starts at its template file position!
-
- v1.05b Oh well - so there were a couple bugs that I didn’t
- check in my hurry to release the 1.05 version (b for
- bug fix!). Now the window for the ascii table is big
- enough(!) and mode changes are handled properly (I
- AM slacking a bit!)
-
- v1.06 Well,well,well. I found a bug that has been resident
- for yonks! (goes to show I actually use it!) - but
- I fixed it. Now brackets ought to work perfectly.
- FINALLY implemented constant operations (who noticed
- it was in the template defn?) Ok, outside stats fns
- I think I have done all I want to do on this app
- now.
-
- v1.06c Bug fixes again. The constant feature turned on
- incorrectly (2*3*4 turned it on because there are
- two *s !). Also clicking on the iconbar sprite
- claims the caret. This must be it!
-
- v1.06d Bug fixes again! Fix and Sci didn’t work properly
- (ta Mike Smith) & fixed a few niggles I noticed when
- playing. Changed my help system over to msgtrans
- (hmm, my system was basically the same, just slower
- cos in BASIC!).
-
- v1.07 Having looked at a semi-working Acorn SciCalc (re
- RISC OS 3!) made a fair few alterations to mine.
- Hopefully this app will now be super-stable since
- the process of compressing the code (much like
- compilation) reveals any nasty bits!
- • Gra (Gradians) with display switch (Ta Acorn!)
- • Shift/Rotate bits in hex and bin modes
- NOTE: mine work properly - Acorn’s are unintuitive
- • Added Hyperbolic functions
- • Added BASIC64 support, auto-detects BASIC VI
- • Simple alteration when (if) extended precision
- comes (add new case where exp_size%=4:sig_fig%=18)
- • Changed system variable root to Emm’sSciCalc to
- avoid clashes with the, now, more common Acorn one
- • Added Desktop saving (from Acorn’s code!). I was
- going to use system variables anyway but along
- comes RISC OS 3
- • Bug fixed Sci (again!)
- • Spotted (and fixed!) another caret claiming bug
- • Fixed base changing bug so that the register is
- not reset when a base change occurs (allows for
- easy inter-base calculations)
- • Hex keys now change colour to that of the numbers‘
- • Disabled & Greyed any unavailable keys
- • Removed M+(M-), sacrificed for Hyp key
- • Key input now not lost but still slow, but faster!
- [can’t make it much faster, lose the icon flash]
- • Simulated typing initiated by <ALT> now cos when
- using <SHIFT> hassel since <SHIFT> is used in
- day to dad life (this one by request!).
- • Removed <SHIFT>=ADJUST in key input & replaced it
- with add &80 onto icon number to click with ADJUST
- • Tidied up code and compressed it so it still fits
- into 48k!
- • THIS MUST BE IT!
-
-
- Comments after 4 years!
- -----------------------
-
- Yes indeed - this app is now over FOUR YEARS old making it
- one of the oldest multi-tasking PD RISC OS progs
-
- Question - Who has been using it for more than two?
- (if you have - what are YOUR niggles with it?)
-
- Question - Does it look nice?
-
- Question - How do you people rate this app to the competition.
- (Does it need a revamp?)
-
- Question - Who uses the ASCII table?
-
- No one has ever commented about the key short cuts.
-
- Question - Does this mean everyone is happy with them as
- they are or has someone found a more
- comprehensive set?
-
- Question - Do you really use result dragging - Can I improve
- the output format? (user defined)
-
- Question - More functions? (extra popup key window?) Which?
-
- Answers on a postcard(!) or Arcade or maurp@csv.warwick.ac.uk
-
-
- Comments - For advanced users
- -----------------------------
-
- The file ‘KeyTable’ holds the key translation array, this
- has been created using the file ‘MakeTable’. This array
- maps ASCII values to icon numbers.
-
- Simply the file holds one byte for every ASCII character
- from 32 (space) to 94 (^). The byte stores the icon number
- to be ‘clicked’ if that particular key is pressed. The
- supplied translation table just translates the numbers and
- arithmetic operators, if you wish to translate other
- functions just call up the template in !FormEd, find the
- icon number for the function, assign the DATA statement on
- the appropriate line (representing the ASCII code) in
- ‘MakeTable’ to the icon number. Should you wish the icon to
- be clicked on by ADJUST rather than SELECT then add &80 to
- the icon number. Now run the program to create the new
- table (note ASCII 255 = no translation).
-
-
- The ChkSpr Utility
-
- The chkspr utility will, when run, examine the ‘!Sprites’
- file and check if the first sprite is the application’s
- name. If not that sprite’s name will be changed to the
- application directory’s name. The !Boot file contains
- ‘Run ChkSpr’, this runs the util, the next line contains
- ‘IconSprites <Obey$Dir>.!Sprites’ this loads the new sprite
- in. The filer always calls any new (ie renamed) app’s !Boot
- file so the new sprite is automatically loaded for display.
-
- Please feel free to use the utility separately from the
- rest of the package but please note that the conditions set
- out below apply to it.
-
-
- Conditions of Use
- -----------------
-
- This application is supplied free to everyone ‘as is’, I
- do not give any guarantee that it is free of bugs, or
- supply any warranty about its suitability for use. However
- if there are any problems with it and you notify me of them
- then I probably will do my best to rectify them.
-
- You may give this application to anyone, via any medium,
- so long as :-
-
- 1) It is delivered with ALL the supplied files and
- unaltered (except !Run & !Boot files) .
-
- 2) It is not supplied on a disc you are charging
- for (except for media and postage costs).
-
- You have permission to use any part or the whole
- application in a project you intend to place in the public
- domain, as long as I am fully credited. If you wish to use
- these routines in a program that is for sale (for however
- much and for whatever reasons) or released as copyright
- material then my express permission in writing must be
- obtained. I maintain copyright on all the material
- supplied and reserve the right to amend these conditions in
- cases where I deem misuse.
-
- A large number of hours of work have gone into the
- production and maintenance of this application and although
- I have supplied the application free, donations will be
- gratefully received (and if over 10 pounds I will send you a
- disc with updates of this and all other pd stuff I have
- written. Please include a letter telling me which apps of
- mine you use and their version numbers).
-
-
- Contacts
- --------
-
- My address:
-
- c/o 6 Parklands Place,
- Guildford,
- Surrey GU1 2PS.
-
-
- BBS I call frequently:
-
- Arcade BBS [081 654 2212] mbx 23
-
- Email address (the best way to contact me)
-
- maurp@csv.warwick.ac.uk
-
- © Emmet Spier 1993 - USE and Enjoy!
-